import Vue from 'vue'
import Router from 'vue-router'
import home from '../components/home.vue'
import News from '../components/news.vue'
import UserReg from '../components/userReg.vue'

Vue.use(Router)

export default new Router({
	routes: [{
		name:"主页",
		path:'/',
		redirect:'/home'
	},{
		name:"主页",
		path:'/home',
		component:home,
		children:[{
			name:"新闻列表",
			path:"/home/news/:id",
			component: News
		},{
			name:"用户注册",
			path:"/home/userreg",
			component:UserReg
		}]
	}]
})
